/*
 * @Descripttion:
 * @version:
 * @Author: yuanliutech
 * @Date: 2025-02-07 17:31:54
 * @LastEditors: yuanliutech@lwj
 * @LastEditTime: 2025-05-15 13:57:22
 */
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

import plugins from "./plugins";
Vue.use(plugins);

Vue.config.productionTip = false;
import "@assets/style/reset.css";
import "@assets/style/iconfont.css";

import axios from "axios";

// const axios2 = axios.create({
//     baseURL: 'http://192.168.1.106:1317/sc/platform/'
// })

// const axios1 = axios.create({
//     baseURL: '其他平台的接口'
// })

// 开发环境
// axios.defaults.baseURL = "http://192.168.1.19:1318/platform/";
// Vue.prototype.$baseURL_copy = "http://192.168.1.19:1318/platform/";

// 后端本地
// axios.defaults.baseURL = "http://192.168.1.8:1318/platform/";
// Vue.prototype.$baseURL_copy = "http://192.168.1.8:1318/platform/";

// 测试环境
axios.defaults.baseURL = "https://sc.yuanliuiot.com/sc/platform/";
Vue.prototype.$baseURL_copy = "https://sc.yuanliuiot.com/sc/platform/";

// 后端本地
// axios.defaults.baseURL = "http://192.168.1.14:1318/platform/";
// Vue.prototype.$baseURL_copy = "http://192.168.1.14:1318/platform/";

// 测试环境
// axios.defaults.baseURL = "https://sc.yuanliuiot.com/sc/platform/";
// Vue.prototype.$baseURL_copy = "https://sc.yuanliuiot.com/sc/platform/";

// axios.defaults.baseURL = 'https://jwa.yuanliuiot.com/sc/platform/'; //正式
// Vue.prototype.$baseURL_copy = 'https://jwa.yuanliuiot.com/sc/platform/' //正式

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);

// 省市区
// import VDistpicker from 'v-distpicker';
// Vue.component('v-distpicker', VDistpicker);

// xlsx相关
// import XLSX from 'xlsx';
// require('script-loader!file-saver'); //保存文件用
// require('script-loader!xlsx/dist/xlsx.core.min'); //xlsx核心
// Vue.use(XLSX);

// 在Vue中使用this.$jsonp，先安装相应的依赖 按需引入import { jsonp } from 'vue-jsonp'
// import {
//     VueJsonp
// } from 'vue-jsonp';
// Vue.use(VueJsonp);

//全局过滤器
import * as filters from "./filters/filterModule.js";
Object.keys(filters).forEach((key) => {
    Vue.filter(key, filters[key]);
});

import dataV from "@jiaminghi/data-view";
Vue.use(dataV);

import { initDynamicRoutes } from "./router/index"; //动态路由引入
initDynamicRoutes();
import "./utils/permission"; //按钮权限控制全局引入
import "./utils/selectLoadMore.js"; //下拉框加载更多

import "./assets/icons/index"; //svg

import preventRepeatClick from "./utils/preventRepeatClick"; // 防止重复点击
Vue.use(preventRepeatClick);

import { Toast } from "vant"; // 有版本问题 建议安装指定版本2.12.54
import "vant/lib/index.css";
Vue.use(Toast);

// 字典标签组件
import DictTag from '@/components/DictTag'
// 字典数据组件
import DictData from '@/components/DictData'
// 全局组件挂载
Vue.component('DictTag', DictTag)
DictData.install()

new Vue({
    router,
    store,
    render: (h) => h(App),
}).$mount("#app");